import request from '@/utils/request'

// 写法1
// export function getDepartments() {
//   return request({
//     url: '/company/department'
//   })
// }
// 写法2
export const getDepartments = function(){
  return request.get('/api/company/department')
}

// 获取简单员工数据
export const getEmployeeSimple = function(){
  return request.get('/api/sys/user/simple')
}

// 新增部门(需要传参)
export const addDepartment = function(data){
  return request.post('/api/company/department', data)
}

export const delDepartment = function(id){
  return request.delete('/api/company/department/' + id)
}